
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets" template="/template/main.xhtml">

	<ui:define name="body">
		<h:form prependId="false">
			<p:toolbar>
				<p:toolbarGroup align="left">
					<p:commandButton value="#{messages['button.save']}" action="#{hospitalEditMB.insert}"
						rendered="#{!hospitalEditMB.updateMode}" ajax="false" />
					<p:commandButton value="#{messages['button.save']}" action="#{hospitalEditMB.update}"
						rendered="#{hospitalEditMB.updateMode}" ajax="false" />
					<p:commandButton value="#{messages['button.delete']}" onclick="confirmation.show()"
						rendered="#{hospitalEditMB.updateMode}" type="button" immediate="true" ajax="false" />
					<p:confirmDialog message="#{messages['label.confirm.delete']}" showEffect="bounce" hideEffect="explode"
						header="#{messages['label.dialog.delete']}" severity="alert" widgetVar="confirmation">
						<h:commandButton value="#{messages['button.dialog.yes']}" action="#{hospitalEditMB.delete}" immediate="true"
							ajax="false" />
						<h:commandButton value="#{messages['button.dialog.no']}" onclick="confirmation.hide()" type="button" />
					</p:confirmDialog>
				</p:toolbarGroup>
			</p:toolbar>

			<br />

			<p:fieldset legend="#{messages['hospital.label']}" toggleable="true" toggleSpeed="500">
				<h:panelGrid id="fieldshospital" columns="12">
				
					<h:outputLabel value="#{messages['hospital.label.id']}: " for="id" styleClass="text-input" />
										
					<h:outputText id="id" value="#{hospitalEditMB.bean.id}" />
					
					<p:message for="id" />
						
					<h:outputLabel value="#{messages['hospital.label.nomeHospital']}: " for="nomeHospital" styleClass="text-input" />
					
					<h:inputText id="nomeHospital" value="#{hospitalEditMB.bean.nomeHospital}"
						title="#{messages['hospital.alt.nomeHospital']}" />
					
					<p:message for="nomeHospital" />
						
					<h:outputLabel value="#{messages['hospital.label.cep']}: " for="cep" styleClass="text-input" />
					
					<h:inputText id="cep" value="#{hospitalEditMB.bean.cep}"
						title="#{messages['hospital.alt.cep']}" />
					
					<p:message for="cep" />
						
					<h:outputLabel value="#{messages['hospital.label.endereco']}: " for="endereco" styleClass="text-input" />
					
					<h:inputText id="endereco" value="#{hospitalEditMB.bean.endereco}"
						title="#{messages['hospital.alt.endereco']}" />
					
					<p:message for="endereco" />
						
					<h:outputLabel value="#{messages['hospital.label.numero']}: " for="numero" styleClass="text-input" />
					
					<h:inputText id="numero" value="#{hospitalEditMB.bean.numero}"
						title="#{messages['hospital.alt.numero']}" />
					
					<p:message for="numero" />
						
					<h:outputLabel value="#{messages['hospital.label.cidade']}: " for="cidade" styleClass="text-input" />
					
					<h:inputText id="cidade" value="#{hospitalEditMB.bean.cidade}"
						title="#{messages['hospital.alt.cidade']}" />
					
					<p:message for="cidade" />
						
					<h:outputLabel value="#{messages['hospital.label.estado']}: " for="estado" styleClass="text-input" />
					
					<p:selectOneMenu id="estado" effect="fade" value="#{hospitalEditMB.bean.estado}">
						<f:selectItems value="#{hospitalEditMB.estado}" />
					</p:selectOneMenu>					
								
					<p:message for="estado" />
						
					<h:outputLabel value="#{messages['hospital.label.telefone']}: " for="telefone" styleClass="text-input" />
					
					<h:inputText id="telefone" value="#{hospitalEditMB.bean.telefone}"
						title="#{messages['hospital.alt.telefone']}" />
					
					<p:message for="telefone" />
						
					<h:outputLabel value="#{messages['hospital.label.especialidade']}: " for="especialidade" styleClass="text-input" />
					
					<h:inputText id="especialidade" value="#{hospitalEditMB.bean.especialidade}"
						title="#{messages['hospital.alt.especialidade']}" />
					
					<p:message for="especialidade" />
						
					<h:outputLabel value="#{messages['hospital.label.leito']}: " for="leito" styleClass="text-input" />
					
					<h:inputText id="leito" value="#{hospitalEditMB.bean.leito}"
						title="#{messages['hospital.alt.leito']}" />
					
					<p:message for="leito" />
						
					<h:outputLabel value="#{messages['hospital.label.uti']}: " for="uti" styleClass="text-input" />
					
					<h:inputText id="uti" value="#{hospitalEditMB.bean.uti}"
						title="#{messages['hospital.alt.uti']}" />
					
					<p:message for="uti" />
						
					<h:outputLabel value="#{messages['hospital.label.corredor']}: " for="corredor" styleClass="text-input" />
					
					<h:inputText id="corredor" value="#{hospitalEditMB.bean.corredor}"
						title="#{messages['hospital.alt.corredor']}" />
					
					<p:message for="corredor" />
						
					<h:outputLabel value="#{messages['hospital.label.respirador']}: " for="respirador" styleClass="text-input" />
					
					<h:inputText id="respirador" value="#{hospitalEditMB.bean.respirador}"
						title="#{messages['hospital.alt.respirador']}" />
					
					<p:message for="respirador" />
						
					<h:outputLabel value="#{messages['hospital.label.oxigenio']}: " for="oxigenio" styleClass="text-input" />
					
					<h:inputText id="oxigenio" value="#{hospitalEditMB.bean.oxigenio}"
						title="#{messages['hospital.alt.oxigenio']}" />
					
					<p:message for="oxigenio" />
						
					<h:outputLabel value="#{messages['hospital.label.co2']}: " for="co2" styleClass="text-input" />
					
					<h:inputText id="co2" value="#{hospitalEditMB.bean.co2}"
						title="#{messages['hospital.alt.co2']}" />
					
					<p:message for="co2" />
						
				</h:panelGrid>
			</p:fieldset>
			
		</h:form>
	</ui:define>
</ui:composition>